/*
 * ListOperatorExpression.java
 *
 * Created on March 1, 2007, 10:17 PM
 *
 * (C) R. Alexander Milowski alex@milowski.com
 */

package com.smallx.xpath.parser;

/**
 *
 * @author R. Alexander Milowski
 */
public class StepExpression implements Expression {

   Axis axis;
   Operator operator;
   NodeTestExpression test;
   /** Creates a new instance of ListOperatorExpression */
   public StepExpression(NodeTestExpression test) {
      this(Axis.Child,test);
   }
   /** Creates a new instance of ListOperatorExpression */
   public StepExpression(Axis axis,NodeTestExpression test) {
      this.operator = Operator.Step;
      this.axis = axis;
      this.test = test;
   }
   
   public NodeTestExpression getTest() {
      return test;
   }
   
   public Operator getOperator() {
      return operator;
   }
   
   public String toString() {
      return "("+operator+" "+axis+" "+test+" )";
   }
   
}
